package com.hl.design_mode.create.abstractfactory;

/**
 * 工厂模式例子 1
 * @author Administrator
 */
public class FactoryTest {


    public static void main(String[] args) {
        ShapeFactory factory = new ShapeFactory();

        BC bc = (BC) factory.getCar("BC");
        bc.draw();
        BM bm = (BM) factory.getCar("BM");
        bm.draw();
        YQDZ yqdz = (YQDZ) factory.getCar("YQDZ");
        yqdz.draw();
    }

}
